package java3_1;
/**
 * 13:根据积分计算折扣那题（x为积分)：
 * x ＜ 2000	        9折
 * 2000 ≤ x ＜ 4000	8折
 * 4000 ≤ x ＜ 8000	7折
 * x ≥ 8000	        6折
 * 输入用户的积分，输出他获得的折扣
 */

import java.util.Scanner;

public class homework13 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入积分：");
        int x = scanner.nextInt();
        if (x<2000&&x>0){
            double b = x*0.9;
            System.out.println("您获得的折扣为："+b);
        }else if (x>=2000&&x<4000){
            double b = x*0.8;
            System.out.println("您获得的折扣为："+b);
        }else if (x>=4000&&x<8000){
            double b = x*0.7;
            System.out.println("您获得的折扣为："+b);
        }else if (x>=8000){
            double b = x*0.6;
            System.out.println("您获得的折扣为："+b);
        }
        else {
            System.out.println("您输入的金额无法获得折扣！");
        }
    }
}
